package com.fanbai.score.user.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;

import com.fanbai.score.R;
import com.fanbai.score.common.Manager.ActivityManager;
import com.fanbai.score.common.Utils.ImageUtils;
import com.fanbai.score.common.base.BaseActivity;
import com.zhy.adapter.recyclerview.CommonAdapter;
import com.zhy.adapter.recyclerview.base.ViewHolder;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by acer on 2017/6/4.
 * 购物车支付界面
 */

public class CartOrder_Activity extends BaseActivity{

    @BindView(R.id.view_recyclerView)
    RecyclerView mRecyclerView;

    @Override
    protected int getLayoutID() {
        return R.layout.user_activity_cartorder;
    }

    @Override
    public String getTitleName() {
        return "购物确认";
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        List<String> dataList = new ArrayList<>();
        for (int i = 0; i < 10 ; i++){
            dataList.add("item"+i);
        }
       mRecyclerView.setLayoutManager(new LinearLayoutManager(ctx));
        mRecyclerView.setAdapter(new CommonAdapter<String>(ctx, R.layout.user_item_cartorder_shop,
                dataList){
            @Override
            protected void convert(ViewHolder holder, String s, int position) {
                holder.setText(R.id.userItemShopCartOrder_shopName, s);
            }
        });
    }

    @Override
    protected void initListener() {

    }

    @Override
    public int getTitleLeftName() {
        return R.mipmap.back_click;
    }

    @Override
    public void onClickTitleLeft() {
        ActivityManager.getInstance().finishActivity();
    }

}
